cmake_minimum_required(VERSION 3.5.1)

add_subdirectory(bare_intersection/unprotected)

add_subdirectory(lane_follow)

add_subdirectory(narrow_street_u_turn)

add_subdirectory( park/pull_over )
add_subdirectory( park/valet_parking )

add_subdirectory( stop_sign/unprotected )

add_subdirectory( traffic_light/protected )
add_subdirectory( traffic_light/unprotected_left_turn )
add_subdirectory( traffic_light/unprotected_right_turn )

add_subdirectory( util )


add_library( stage  stage.cc )
target_link_libraries( stage 
                                common
                                planning_common_module
                                planning::common_lib
                                planning::util_lib
                                task

                            
                              task_factory

                                )


add_library( scenario  scenario.cc )
target_link_libraries( scenario 
stage
common
planning_common_lib
planning_common_module
planning::common_lib
planning::util_lib
task
)


add_library( stage_intersection_cruise_impl    stage_intersection_cruise_impl.cc)
target_link_libraries( stage_intersection_cruise_impl
                                common
                                planning_common_lib
                                planning_common_module
                                planning::common_lib

                                planning::util_lib
                                )



add_library( scenario_manager  scenario_manager.cc )
target_link_libraries( scenario_manager
common
planning_common_lib
planning_common_module
planning::common_lib
planning::util_lib
bare_intersection_unprotected_scenario
lane_follow
pull_over_scenario
valet_parking
stop_sign_unprotected_scenario
traffic_light_protected_scenario
traffic_light_unprotected_left_turn_scenario
traffic_light_unprotected_right_turn_scenario
)



install(TARGETS stage
                scenario_manager
                scenario
                stage_intersection_cruise_impl
        EXPORT  apollo-export
        LIBRARY DESTINATION lib
        ARCHIVE DESTINATION lib
        RUNTIME DESTINATION bin
        INCLUDES DESTINATION .
        )